package com.hans.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.hans.myscanner.R;
import com.hans.myscanner.widget.list_view.ExpandGridView;

/**
 * Created by Administrator on 2016/7/9.
 */
public class ShareDialog extends CustomDialog {
    private TextView title;
    private ExpandGridView messageGV;
    private Button closeBtn;

    public ShareDialog(Context context) {
        super(context, R.layout.dialog_share);
        findview();
        initview();
    }

    private void findview() {
        title= (TextView) findViewById(R.id.title);
        messageGV= (ExpandGridView) findViewById(R.id.message);
        closeBtn= (Button) findViewById(R.id.close_btn);
    }
    private void initview() {
        title.setText("分享");
        closeBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if(v.getId()==R.id.close_btn) dismiss();
            }
        });
    }


    private OnShareDialogClickListener onShareDialogClickListener;

    public void setOnShareDialogClickListener(OnShareDialogClickListener onShareDialogClickListener) {
        this.onShareDialogClickListener = onShareDialogClickListener;
    }
    public interface OnShareDialogClickListener {

        void oncloseBtnClicked();
    }
}
